package ro.gateway.aida.db;

import ro.gateway.aida.utils.ObjectFinder;


public class PersistenceManager
{
      protected PersistenceToken token;

      public PersistenceManager() {
      }

      public PersistenceManager(PersistenceToken token) {
            this.token = token;
      }

      /**
       * Hashtable, containers lookup
       * getters lookup
       *
       * @param where_to_lookup
       * @return
       */
      public static PersistenceToken tokenLookup( Object where_to_lookup )
      {
            Object opers_token = ObjectFinder.
                  findObject( PersistenceToken.TOKEN_KEY, where_to_lookup, null );
            if ( !( opers_token instanceof PersistenceToken ) )
                  return null;

			PersistenceToken pers_token = ( PersistenceToken ) opers_token;
			 
            return pers_token;
      }
}
